<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="./js/ctx.js"></script>
</head>
<body>
<div id="cesiumContainer">
</div>
<script>
    var initCesium = new InitCesium();
    var viewer = initCesium.initViewer('cesiumContainer',{
        shouldAnimate : true
    });
    var czml = [{
        "id" : "document",
        "name" : "CZML Model",
        "version" : "1.0"
    }, {
        "id" : "aircraft model",
        "name" : "Cesium Air",
        "position" : {
            "cartographicDegrees" : [-77, 37, 10000]
        },
        "model": {
            "gltf" : "../data/models/CesiumAir/Cesium_Air.glb",
            "scale" : 2.0,
            "minimumPixelSize": 128
        }
    }];

    var dataSourcePromise = viewer.dataSources.add(Cesium.CzmlDataSource.load(czml));

    dataSourcePromise.then(function(dataSource){
        viewer.trackedEntity = dataSource.entities.getById('aircraft model');
    }).otherwise(function(error){
        window.alert(error);
    });



</script>
</body>
</html>